{layout name="../common/master"/}

<script src="__PUBLIC__/uploadify/jquery.uploadify.min.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/uploadify/uploadify.css">

<div id="right">
    <h4 style="border-bottom: 1px solid #ccc;padding-bottom: 3px">添加定时任务</h4>
    <div id="app">
        <form action="javascript:;" method="post" role="form" class="col-lg-6">
            <div class="form-group">
                <label for="">类型</label>
                <input type="text" class="form-control" required  name="type"  placeholder="请输入类型">
            </div>

            <div class="form-group">
                <label for="">开始时间</label>
                <input name="start_time" type="text"  onclick="WdatePicker({startDate:'%y-%M-01 00:00:00',dateFmt:'yyyy-MM-dd HH:mm:ss',alwaysUseStartDate:true})"/>
            </div>
            <div class="form-group">
                <label for="">执行时间</label>
                <input name="exe_time" type="text"  onclick="WdatePicker({startDate:'%y-%M-01 00:00:00',dateFmt:'yyyy-MM-dd HH:mm:ss',alwaysUseStartDate:true})"/>
            </div>

            <div class="form-group">
                <label for="">执行内容</label>
                <textarea name="content" id="" cols="30" rows="10"></textarea>
            </div>
            <button type="submit" id="form_submit" class="btn btn-primary">提交</button>
        </form>
    </div>
</div>
<script>
    $("#form_submit").click(function () {
        var data=$("form").serialize();
        $.post("{:URL('home/Toolcol/addCrontab')}",data,function(res){
            if(res.code == 0){
              layer.alert(res.msg);
                location.href="{:URL('home/Toolcol/cronTabList')}";
            }
        })
    })
</script>
<script type="text/javascript" src="__PUBLIC__/home/tuo/DatePicker/WdatePicker.js"></script>

